<script setup lang="ts">
import { useUserStore } from '@/store'
import BasicSellerInfo from './components/BasicSellerInfo.vue'
import PickerInfo from './components/PickerInfo.vue'
import Distribution from './components/Distribution.vue'
const userStore = useUserStore()
const detail = reactive({})
const getInfo = () => {
  userStore.getInfo(() => {
    Object.assign(detail, userStore.userInfo)
  })
}
onMounted(() => {
  getInfo()
})
</script>

<template>
  <a-card>
    <div class="page">
      <a-tabs lazy-load>
        <a-tab-pane title="基础信息" key="1">
          <BasicSellerInfo :info="detail" @getInfo="getInfo" />
        </a-tab-pane>
        <a-tab-pane title="自提配置" key="2">
          <PickerInfo :info="detail" @getInfo="getInfo" />
        </a-tab-pane>
        <a-tab-pane title="配送设置" key="3">
          <Distribution :info="detail" @getInfo="getInfo" />
        </a-tab-pane>
      </a-tabs>
    </div>
  </a-card>
</template>

<style lang="less" scoped>
.page {
}
</style>
